<!--Index used-->
<div class="coupleds index">
  <section class="search">
    <h2><?php echo __('Listado de Acoplado/Semis'); ?></h2>
    <?php echo $this->Form->input('Buscar:', array('class' => 'searchCoupled', 'id' => 'searchCoupled')) ?>
  </section>
  <div id="coupleds_list">
    <?php echo $this->element('coupleds/table'); ?>
  </div>
</div>
<div class="actions">
  <h3><?php echo __('Actions'); ?></h3>
  <ul>
    <li><?php echo $this->Html->link(__('New Coupled'), array('action' => 'add')); ?></li>
    <li><?php echo $this->Html->link(__('List Companies'), array('controller' => 'companies', 'action' => 'index')); ?> </li>
    <li><?php echo $this->Html->link(__('New Company'), array('controller' => 'companies', 'action' => 'add')); ?> </li>
  </ul>
</div>

<script>
  $(document).ready(function(){
        
    //       Ajax Search keys press
    $('#searchCoupled').keyup(function() {
      var name = $("#searchCoupled").val();
      $("#coupleds_list").load('<? echo $this->Html->url('search') ?>',{name:name});
    });
        
  });
</script>    